# 写于2019,6,1 李卓颖还是李天宝

from flask import Flask, url_for
from werkzeug.routing import BaseConverter
import time

app = Flask(__name__)


# 以下为我对源代码的修改，以期望能够匹配手机号码

class Telephone(BaseConverter):
    def __init__(self, map):
        BaseConverter.__init__(self, map)
        self.regex = r'^1[837][0-9]{9}'


@app.route('/list')
def list():
    print(url_for('hello'))
    time.sleep(3)
    return url_for('hello')


@app.route('/')
def hello():
    return 'hello world'


if __name__ == '__main__':
    app.run(debug=True)
